Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Editing Tracks

The Movie Toolbox contains one new function for editing tracks.

AddEmptyTrackToMovie

The AddEmptyTrackToMovie function duplicates a track from a movie into the same movie or into another movie. The newly created track has the same media type and track settings as the specified track. However, no data is copied from the source track to the new track.

To copy data from the source track to the new track, use the InsertTrackSegment function after calling AddEmptyTrackToMovie.

pascal OSErr AddEmptyTrackToMovie(Track srcTrack,
                     Movie dstMovie,
                     Handle dataRef,
                     OSType dataRefType,
                     Track *dstTrack);
srcTrack
Specifies the source track for this operation. Your application obtains this track identifier from such toolbox functions as NewMovieTrack and GetMovieTrack .

dstMovie
Specifies the destination movie for this operation. This can be the same movie as the source track or a different movie.

dataRef
Contains a handle to the data reference. The type of information stored in the handle depends upon the data reference type specified by the dataRefType parameter.

dataRefType
Specifies the type of data reference. If the data reference is an alias, you must set the parameter to rAliasType , indicating that the reference is an alias.

dstTrack
The newly created track's identifier is returned in this parameter. If AddEmptyTrackToMovie fails, the resulting track identifier is set to nil .

DISCUSSION

The AddEmptyTrackToMovie function returns the newly created, empty track. This function has been available since QuickTime 2.0.


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |